* {
    margin: 0px;
    padding: 0px;
}

li {
    list-style: none;
}

i {
    font-style: normal;
}

body {
    overflow: hidden;
    background: url(../images/background-03.webp);
}

.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

// 主要组件背景颜色
@mainColor: rgba(19, 19, 19, .8);

// 普通显示文字的颜色
@normalFontColor:  #fff;
// 按钮文字的颜色
@baseFontColor:  #a6d8ff;
// hover状态下文字颜色
@hoverFontColor: #ffffff;
// 非激活状态下文字颜色
@nonActiveFontColor: #7c7d7f;
// iconfont 颜色
@iconfontColor: #ffffff;

// 普通状态下盒子背景颜色
@bgColor: #444444b0;
// 激活状态下盒子背景颜色
@activeBgColor: #1b86db;
// hover状态下盒子背景颜色
@hoverBgColor: rgba(150,150,150,.2);

// hover时边框颜色，包含outline
@hoverBdColor: rgba(162, 162, 161, .8);
// 普通状态下边框颜色
@bdColor: rgba(19, 19, 19, .2);

// 窗口阴影
@winShadow: 0.5px 0.5px 1px rgba(0, 0, 0, .7);
// 窗口背景颜色
@winbgc: #efefef;

// vw适配方案
// 像素值转换为视口值
.vw(@a) {
    @result: unit(round((100 * @a / 1226), 10), vw);
}

// vh适配方案
// 像素值转换为视口值
.vh(@a) {
    @result: unit(round((100 * @a / 920), 10), vh);
}

// 桌面样式开始-------------------------------------------------------- 
.desktop {
    display: block;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    z-index: -999;
    user-select: none;

    input {
        display: none;
    }

    ul {
        display: flex;
        height: 100vh;
        justify-content: left;
        flex-direction: column;
        flex-wrap: wrap;

        li {
            text-align: center;
            flex-grow: 0;
            margin:.vh(.8)[] .vw(.5)[];

            label {
                display: block;
            }

            input {

                &:checked ~ div[data-icon-pos] {
                    background-color: rgba(70, 111, 165, 0.6);
                    outline: .vw(1)[] solid @hoverBdColor;
                }
            }
            
            div {
                box-sizing: border-box;
                padding: .vh(10)[] .vw(1.5)[] .vh(6)[];
                height: .vh(86.5)[];
                width: .vw(70)[];
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                overflow: hidden;

                &[data-icon-pos]:hover {
                    background-color: rgba(70, 111, 165, 0.4);
                    outline: .vw(1)[] solid @hoverBdColor;
                }

                img {
                    flex-shrink: 0;
                    width: .vw(30)[];
                }
    
                span {
                    flex-shrink: 1;
                    margin-top: .vh(5)[];
                    display: block;
                    font-size: .vh(12)[];
                    color: @normalFontColor;
                    text-shadow: 0 0 .vw(2)[] #000;
                    width: 100%;
                    // word-wrap: break-word;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }
            }

            
        }
    }
}

// 底部任务栏开始 --------------------------------------------------------

#taskBarCtrl {
    display: none;
}

.task-bar {
    width: 100%;
    height: .vh(30)[];
    position: fixed;
    bottom: 0;
    user-select: none;
    z-index: 998;
    
    &:hover .task-bar-container {
        top: 0;
        transition: all 0.5s;
    }
    
    .task-bar-container {
        // 默认样式
        background-color: @mainColor;
        backdrop-filter: blur(2px);
        // 透明任务栏
        // background-color: transparent;
        transition: all 0.5s;
        width: 100%;
        position: absolute;
        top: 0px;
        // 自动隐藏时打开下面的内容
        // top: .vh(32)[];
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .left-container {
            display: flex;
            justify-content: start;
            align-items: center;

            .start-btn {
                width: .vw(32)[];
                height: .vh(30)[];
                display: flex;
                align-items: center;
                justify-content: center;

                &:hover {
                    background-color: @hoverBgColor;

                    i {
                        color: @activeBgColor;
                    }
                }

                i {
                    font-size: .vh(16)[];
                    color: @iconfontColor;
                    text-align: center;
                    line-height: .vh(30)[];  
                }
            }

            .tasks-container ul{
                display: flex;
                align-items: center;
                justify-content: start;

                li.task-item {
                    width: .vw(32)[];
                    height: .vh(30)[];
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    position: relative;
                    overflow: hidden;

                    &:hover {
                        color: @activeBgColor;
                        background-color: @hoverBgColor;
                        
                        .current {
                            width: 100%;
                            transition: all 0.3s;
                        }
                    }

                    img {
                        width: .vw(16)[];
                    }

                    span {
                        position: absolute;
                        bottom: 1px;
                        left: 50%;
                        transform: translateX(-50%);
                        display: block;
                        width: .vw(24)[];
                        height: .vh(2)[];
                        transition: all 0.3s;
                    }

                    .current {
                        background-color: @activeBgColor;
                        transition: all 0.3s;
                    }
                }

                li.task-item.top {
                    color: @activeBgColor;
                    background-color: @hoverBgColor;
                        
                    .current-top {
                        width: 100%;
                        transition: all 0.3s;
                    }

                    .current {
                        background-color: @activeBgColor;
                        transition: all 0.3s;
                    }
                }
            }
        }
        
        .right-container {
            display: flex;
            align-items: center;
            justify-content: right;
            flex-direction: row-reverse;

            li {
                padding: 0 .vw(8)[];
                font-size: .vh(14)[];
                color: @normalFontColor;
                text-align: center;
                line-height: .vh(30)[]; 
                
                &:hover {
                    background-color: @hoverBgColor;
                }
            }

            .show-desktop-btn {
                padding: 0;
                margin-left: .vw(6)[];

                .show-desktop {
                    display: block;
                    width: .vw(4)[];
                    height: .vh(30)[];
                    border-left: .vw(1)[] solid #ccc;
                }
            }

            .time {
                display: block;
                height: .vh(30)[];
                font-size: .vh(14)[];
                line-height: .vh(30)[];
            }

            .more {
                font-size: .vh(18)[];;
            }

            .input-method::after {
                content: "英";
            }

            #inputMethodCtrl {
                display: none;

                &:checked ~ li .input-method::after {
                    content: "中";
                }
            }

            i {
                color: @iconfontColor;    
            }
        }
    }
}

// 右侧通知中心开始 --------------------------------------------------------
#msgCenterCtrl {
    position: absolute;
    display: none;
    &:checked ~ .msg-center .msg-center-container{
        right: 0;
        transition: all 0.5s;
    }
}

.msg-center {
    .msg-center-container {
        position: fixed;
        right: .vw(-340)[];
        top: 0;
        width: .vw(336)[];
        height: 100%;
        background-color: @mainColor;
        backdrop-filter: blur(30px);
        border-left: 1px solid @bdColor;
        z-index: 999;
        user-select: none;
        transition: all 0.5s;

        .msg {
            z-index: 1;
            padding: 0 .vw(18)[];
            height: .vh(480)[];
            overflow: hidden;

            div.ctrl {
                height: .vh(40)[];
                line-height: .vh(40)[];
                color: @baseFontColor;
                margin: .vh(6)[] 0 .vh(6)[];
                font-size: .vh(12)[];
                text-align: right;

                &:hover {
                    color: @hoverFontColor;
                }
            }

            .msg-content {
                box-sizing: border-box;
                padding: .vw(10)[] .vh(10)[];
                width: 100%;
                background-color:transparent;
                display: flex;
                align-items: center;
                justify-content: space-between;
                transition: all .5s;
                position: relative;
                left: 0;

                &:hover {
                    background-color: @hoverBgColor;
                    transition: all .5s;

                    .msg-desc-ctrl {
                        opacity: 1;
                        transition: all .5s;
                    }
                }

                .exe-icon {
                    height: 100%;
                    position: relative;
                    width: .vw(30)[];

                    img {
                        width: .vw(26)[];
                    }

                }
                .description {
                    width: .vw(249)[];
                    font-size: .vh(16)[];
                    color: @normalFontColor;
                    // overflow: hidden;

                    .desc {
                        text-align: left;
                        padding: 0 0 0 .vw(4)[];
                        font-size: .vh(12)[];
                        color: @nonActiveFontColor;
                        // overflow: hidden;
                    }

                }
                .msg-desc-ctrl {
                    width: .vw(18)[];
                    height: 100%;
                    opacity: 0;
                    transition: all 0.5s;
                    align-self: start;

                    i {
                        display: block;
                        font-size: .vh(12)[];
                        color: @iconfontColor;
                        text-align: center;
                        margin-bottom: .vh(10)[];

                        &:hover {
                            color: @hoverFontColor;
                        }
                    }
                }
            }
        }

        #fold-setting {
            display: none;

            &:checked ~ .setting{
                bottom: .vh(-316)[];
                transition: all 0.3s;

                .ctrl .fold label::after {
                    content: "展开";
                }
            }
        }

        .setting {
            position: absolute;
            transition: all 0.3s;
            bottom: 0;
            height: .vh(418)[];
            z-index: 2;

            
            .setting-container {
                padding: 0 .vw(10)[];
                position: absolute;
                bottom: 0;
                width: .vw(307)[];
                font-size: .vh(12)[];

                .ctrl {
                    height: .vh(40)[];
                    line-height: .vh(40)[];
                    color: @baseFontColor;
                    margin: .vh(10)[] 0 .vw(6)[];

                    .fold {
                        float: left;

                        &:hover {
                            color: @hoverFontColor;
                        }

                        label::after {
                            content: "折叠";
                        }
                    }

                    .clear {
                        float: right;

                        &:hover {
                            color: @hoverFontColor;
                        }
                    }
                }

                .items {
                    width: .vw(310)[];
                    
                    ul {
                        display: flex;
                        flex-wrap: wrap;
                        justify-content: space-between;

                        input {
                            display: none;

                            &:checked ~ li {
                                background-color: @activeBgColor;
                            }
                        }
                        
                        li {
                            flex-shrink: 0;
                            box-sizing: border-box;
                            float: left;
                            border: .vw(1)[] solid @bdColor;
                            width: .vw(76)[];
                            height: .vh(70)[];
                            padding: .vw(4)[];
                            color: @normalFontColor;
                            font-size: .vh(12)[];
                            background-color: @bgColor;
                            transition: all .4s;
                            overflow: hidden;
                            margin-bottom: .vh(3)[];


                            &:hover {
                                border: .vw(1)[] solid @hoverBdColor;
                                transition: all .4s;
                            }
                            
                            i {
                                display: block;
                                width: .vw(24)[];
                                height: .vw(24)[];
                                margin-bottom: .vh(10)[];
                                font-size: .vh(14)[];
                                color: @iconfontColor;
                            }
                        }
                    }            
                }

                .bright-ctrl {
                    width: .vw(250)[];
                    margin: .vw(20)[] auto;
                    height: .vh(40)[];
                    border: .vw(1)[] solid @bdColor;
                    color: @iconfontColor;
                    font-size: .vh(20)[];
                    padding: 0 .vw(10)[];
                    display: flex;
                    align-items: center;

                    .brightness {
                        flex-grow: 1;
                        height: 100%;
                        margin-left: .vw(20)[];
                        display: flex;
                        align-items: center;

                        .total {
                            width: 100%;
                            height: .vh(2)[];
                            position: relative;
                            background-color: @bgColor;

                            .bar {
                                width: 60%;
                                height: 100%;
                                background-color: @activeBgColor;
                            }

                            .slider {
                                position: absolute;
                                height: .vh(24)[];
                                width: .vw(8)[];
                                background-color: @activeBgColor;
                                top: 50%;
                                transform: translateY(-50%);
                                left: 60%;
                                border-radius: .vw(4)[];
                            }
                        }
                    }
                }
            }   
        }
    }
}

// 任务栏日期组件开始------------------------------------------
#calendarCtrl {
    position: absolute;
    display: none;

    &:checked ~ .date {
        bottom: .vh(30)[];
        transition: all .5s;
    }
}

.date {
    width: .vw(312)[];
    height: .vh(520)[];
    border: .vw(1)[] solid @hoverBgColor;
    border-right: none;
    border-bottom: none;
    background-color: @mainColor;
    backdrop-filter: blur(20px);
    color: @normalFontColor;
    position: fixed;
    bottom: .vh(-540)[];
    transition: all .5s;
    right: 0;
    font-size: .vh(14)[];;
    user-select: none;
    overflow: hidden;
    z-index: 998;

    .top {
        padding: .vh(15)[];;
        border-bottom: .vw(1)[] solid @hoverBgColor;

        .time {
            font-size: .vh(50)[];
            font-family: "Microsoft YaHei";
            font-weight: lighter!important;
        }

        .day {
            color: @baseFontColor;

            &:hover {
                color: @hoverFontColor;
            }
        }
    }

    .main {
        padding: 0px .vw(6)[] 0 .vw(15)[];

        .select {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: .vh(10)[] 0;
            font-size: .vh(16)[];

            .ctrl i{
                margin-left: .vw(10)[];
                margin-right: .vw(18)[];
                color: @iconfontColor;

                &:hover {
                    color: @hoverFontColor;
                }
            }
        }

        .weekdays {
            font-size: .vh(14)[];
            box-sizing: border-box;
            width: 100%;

            ul {
                display: flex;
                width: 100%;
                justify-content: space-around;

                li {
                    height: .vh(30)[];
                    font-size: .vh(14)[];
                    text-align: center;
                    line-height: .vh(30)[];
                }
            }
        }

        .days {
            font-size: .vh(30)[];
            width: 100%;
            box-sizing: border-box;

            ul {
                display: flex;
                width: 100%;
                justify-content: space-between;
                flex-wrap: wrap;
                height: .vh(290)[];

                li {
                    height: .vh(42)[];
                    width: .vw(37)[];;
                    box-sizing: border-box;
                    font-size: .vh(14)[];
                    text-align: center;
                    padding: 0 .vw(6)[];
                    position: relative;
                    border: .vw(2)[] solid transparent;
                    transition: all .3s;
                    margin: 0 .vw(2)[];
                    overflow: hidden;
                    flex-shrink: 0;

                    .cyear, .nyear {
                        display: block;
                    }

                    .nyear {
                        font-size: .vh(12)[];
                    }

                    &:hover {
                        outline: .vw(2)[] solid @hoverBdColor;
                        transition: all .3s;
                    }
                }
            }

            .notCurrentMonth {
                color: @nonActiveFontColor;
            }

            .current-date {
                background-color: @activeBgColor;
                border: .vw(2)[] solid #000;
                outline: .vw(2)[] solid @activeBgColor;
                transition: all .3s;

                &:hover {
                    outline: .vw(2)[] solid @hoverBdColor;
                    transition: all .3s;
                }
            }
        }        
    }

    .setting {
        padding: 0 .vw(20)[];
        margin-top: .vh(8)[];
        color: @baseFontColor;

        & span:hover {
            color: @hoverFontColor;
        }
    }
}

// 右键菜单------------------------------------------------

#rightMenuCtrl {
    display: none;

    &:checked ~ div.right-key-menu {
        // opacity: 1;
        display: block;
        // transition: height .3s;
        // height: auto;
    }
}

.right-key-menu {
    position: absolute;
    user-select: none;
    width: 200px;
    z-index: 998;
    border: 1px solid @bdColor;
    box-shadow: @winShadow;
    background-color: @winbgc;
    display: none;
    padding: 2px 0;

    hr {
        width: 94%;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        height: 1px;
        background-color: @bdColor;
        margin: 2px 0;
        border: none;
    }

    li {
        font-size: 12px;
        height: 30px;
        line-height: 30px;
        padding: 0 22px;
        background-color: @winbgc;
        background-repeat: no-repeat;
        background-size: 13px;
        background-position: .vw(5)[] center;
        color: #000;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;

        &:hover {
            background-color: #fff;
        }
    }
}

// 桌面窗口------------------------------------------------

.win {
    border: 1px solid @bdColor;
    box-shadow: @winShadow;
    position: absolute;
    background-color: #fff;
    overflow: hidden;
    z-index: 1;

    .win-container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;

        .win-head {
            height: 30px;
            background-color: @winbgc;
            display: flex;
            align-items: center;
            justify-content: space-between;
            user-select: none;
            flex-grow: 0;

            .win-title {
                display: flex;
                align-items: center;
                justify-content: start;

                .win-icon {
                    padding: 0 5px;
                    img {
                        width: 20px;
                        vertical-align: -2px;
                    }
                }

                .win-name {
                    font-size: 12px;
                    white-space: nowrap;
                }
            }

            .win-control {
                display: flex;
                align-items: center;
                justify-content: flex-end;

                li {
                    padding: 0 .vw(15)[];
                    height: 30px;
                    transition: all .3s;

                    &:hover {
                        background-color: #e5e5e5;
                    }

                    &.win-close:hover {
                        background-color: #e81123;
                        color: #fff;
                    }

                    i {
                        font-size: 14px;
                        line-height: 30px;

                        &[class*="fa-square"] {
                            font-weight: lighter!important;
                        }

                        &[class*="fa-times"] {
                            font-size: 16px;
                        }
                    }
                }
            }
        }

        iframe {
            width: 100%;
            // height: 100% - .vh(34)[];
            border: none;
            outline: none;
            overflow: hidden;
            flex-grow: 1;
        }

    }
}

.system-notification {
    // width: .vw(320)[];
    // height: .vh(130)[];
    user-select: none;
    // background-color: red;
    position: fixed;
    bottom: .vh(30)[];
    right: .vw(-261)[];
    outline: .vw(1)[] solid @bdColor;
    background-color: @mainColor;
    backdrop-filter: blur(10px);

    li {
        width: .vw(310)[];
        padding: .vh(15)[] .vw(10)[];
        transition: all .5s;
    }

    li:hover {
        background-color: @hoverBgColor;
        transition: all .5s;
    }

    li:hover .close {
        opacity: 1!important;
        transition: all .5s;
    }

    .top {
        height: .vh(30)[];
        position: relative;

        img {
            height: 60%;
            vertical-align: middle;
        }

        h2 {
            font-size: .vh(16)[];
            color: @normalFontColor;
            display: inline-block;
            margin-left: .vw(5)[];
            font-weight: normal;
        }

        .close {
            display: inline-block;
            position: absolute;
            right: .vw(15)[];
            color: @iconfontColor;
            opacity: 0;
            font-size: .vh(12)[];
            transition: all 0.5s;
        }
    }

    .content {
        padding: .vh(10)[] .vw(5)[] 0;
        color: @normalFontColor;
        font-size: .vh(14)[];
    }

}

